package cn.dm.controller;

import cn.dm.pojo.DmArea;
import cn.dm.service.DmAreaService;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import java.util.List;
import java.util.Map;

@RestController
public class DmBaseProviderController {
    @Resource
    private DmAreaService  dmAreaService;
    @PostMapping(value = "/getDmAreaById")
    public DmArea getDmAreaById(@RequestParam("id") Long id)throws Exception{
        return  dmAreaService.getDmAreaById(id);

    }

    @PostMapping(value = "/getDmAreaListByMap")
    public List<DmArea> getDmAreaListByMap(@RequestBody Map<String, Object> param)throws Exception{
        return dmAreaService.getDmAreaListByMap(param);

    }

    @PostMapping(value = "/getDmAreaCountByMap")
    public Integer getDmAreaCountByMap(@RequestBody Map<String, Object> param)throws Exception{
        return  dmAreaService.getDmAreaCountByMap(param);
    }

    @PostMapping(value = "/qdtxAddDmArea")
    public Integer qdtxAddDmArea(@RequestBody DmArea dmArea)throws Exception{
        return  dmAreaService.qdtxAddDmArea(dmArea);
    }

    @PostMapping(value = "/qdtxModifyDmArea")
    public Integer qdtxModifyDmArea(@RequestBody DmArea dmArea)throws Exception{
        return  dmAreaService.qdtxModifyDmArea(dmArea);

    }
}
